from django.contrib import admin
from book11 import models
# Register your models here.
class Bookadmin(admin.ModelAdmin):
    list_display = ('id','name','publisher','publisher_date',)
    search_fields = ('name',)
    list_filter = ('name','publisher')
    list_editable = ('name',)
 #   list_per_page = 2
    filter_horizontal = ('author',)
    raw_id_fields = ('publisher',)
    list_select_related = ('publisher',)
class Authoradmin(admin.ModelAdmin):
    list_display = ('first_name','last_name','email',)
class Publisheradmin(admin.ModelAdmin):
    list_display = ('name','city', 'country','website',)

admin.site.register(models.Author,Authoradmin)
admin.site.register(models.Publisher,Publisheradmin)
admin.site.register(models.Book,Bookadmin)